"""
http://v.juhe.cn/laohuangli/d?key=2b1e89319e5d888a525a421ea57ba3c5&date=2022-11-11
"""
import json
import logging

from UI自动化.pytest框架.项目名称.utils工具包.getHttp import getHttp
class LaoHuangLi:

    def __init__(self):
        self.url = "http://v.juhe.cn/laohuangli/d"
        self.request = getHttp()

    def getLaoHuangLi(self, methond,data,headers ):

        result, result_time = self.request.getHttp(methond,self.url,data,headers)
        logging.info("接口返回数据：{0}，接口与响应时间{1}".format(result.text,result_time))
        print(result.text)
        return  result,result_time



if __name__ == '__main__':
    data = {"key": "2b1e89319e5d888a525a421ea57ba3c5", "date":"2022-11-11"}
    headers = {"Content-Type": "application/x-www-form-urlencoded"}
    LaoHuangLi().getLaoHuangLi("post",data,headers)



